Flight-critical systems such as flight controls are certified to high standards according to guidelines, such as RTCA DO-178B, entitled “Software Considerations in Airborne Systems and Equipment Certification” and published by RTCA, Inc. (formerly known as the Radio Technical Commission for Aeronautics); RTCA DO-254, entitled “Design Assurance Guidance for Airborne Electronic Hardware” and published by RTCA, Inc. (formerly known as Radio Technical Commission for Aeronautics); and EUROCAE ED-12, published by European Organization for Civil Aviation Electronics (EUROCAE). As complexity increases, verification of future avionics systems using traditional manual analysis and testing methods becomes an increasingly difficult task. Model-based design techniques, such as those based on MATLAB® Simulink® and Stateflow® software of The MathWorks, Inc. and SCADE Suite® and Design Verifier™ of Esterel Technologies, Inc., are increasingly adopted within the aerospace industry to aid in management of the increased complexity.
Source code can be created in numerous ways, including manual coding by programmers and automatic generation. Source code generation is the process by which a reference model representation of a system is converted into source code. Source code generators automatically generate source code from the reference model representation of the system. In order to apply source code generators to high criticality software (such as avionics software), the source code is verified to ensure that the auto-generated source code implements the behavior specified by the reference model representation. The RTCA DO-178B and DO-254 guidelines and the EUROCADE ED-12 guidelines specifically require the verification process to show that the source code complies with the reference model representation.
One challenge in automatically verifying compliance of source code to the reference model is the analysis of folded source code statements. Modern source code generators, such as MATLAB® Simulink Coder™ (formerly Real-Time Workshop®) software of The MathWorks, Inc., often optimize the generated code for performance by folding the code. Code folding is an effective strategy for this optimization, wherein multiple code statements are folded into a single statement, thus eliminating the need for creating several temporary variables and potentially simplifying mathematical formulae.